package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import kotlinx.coroutines.flow.Flow

@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun register(user: User):Long

    @Query("select * from user where uname=:name and upass=:pass and role=:role")
    fun login(name:String,pass:String,role:String):User
}